import {BaseUrl} from "../constant/constant";
import {ApiFetch} from "../api/apiHandler";

class MatchModel {
    constructor() {
        this.url = BaseUrl
    }

    all(params) {
        let end = this.url + 'getmatchbydate'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    get(params) {
        let end = this.url + 'getmatchbykey'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    push(params) {
        let end = this.url + 'tuisongtoqun'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    addVodLink(params) {
        let end = this.url + 'setzhiboinfo'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    live(params) {
        let end = this.url + 'getgamezhibolist'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    switchLive(params) {
        let end = this.url + 'setzhiboyuan'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    // 93./houtai/gethotgame //获取足球和篮球的热门赛事
    //
    // 93./houtai/sethotgame//设置足球和篮球的热门赛事
    // Id    int      //1足球，2篮球
    // Games []string
    //
    // 94./try/go/gethotgame //获取足球和篮球的热门赛
    hot(params) {
        let end = this.url + 'gethotgame'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    setHot(params) {
        params.Id = 1
        let end = this.url + 'sethotgame'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

}

export default MatchModel
